package com.tianshuo.beantest.main;

import com.tianshuo.beantest.config.BeanConfig;
import com.tianshuo.model.User;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @ClassName : BeanApplicationContextTest
 * @Description : 测试启动的@Bean
 * @Author : tianshuo
 * @Date: 2021-03-03 10:57
 */
public class BeanApplicationContextTest {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(BeanConfig.class);
        User bean = applicationContext.getBean(User.class);
        System.out.println(bean);
    }
}

